import Layout from "@/layout/index.vue";
import type { RouteRecordRaw } from "vue-router";
import Home from "@/views/home/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "root",
    component: Layout,
    redirect: { name: "Home" },
    children: [
      {
        path: "/login",
        name: "Login",
        component: () => import("@/views/login/index.vue"),
        meta: {
          title: "登录"
        }
      },
      {
        path: "home",
        name: "Home",
        component: Home,
        meta: {
          title: "主页"
        }
      },
      {
        path: "jewelry",
        name: "Jewelry",
        component: () => import("@/views/jewelry/index.vue"),
        meta: {
          title: "珠宝"
        }
      },
      {
        path: "dify",
        name: "Dify",
        component: () => import("@/views/dify/index.vue"),
        meta: {
          title: "Dify"
        }
      },
      {
        path: "difychat",
        name: "DifyChat",
        component: () => import("@/views/dify/dify-chat.vue"),
        meta: {
          title: "Dify聊天框"
        }
      },
      {
        path: "difyWorkflow",
        name: "DifyWorkflow",
        component: () => import("@/views/dify/dify-workflow.vue"),
        meta: {
          title: "Dify"
        }
      },
      {
        path: "difyWorkflowChat",
        name: "DifyWorkflowChat",
        component: () => import("@/views/dify/dify-workflow-chat.vue"),
        meta: {
          title: "Dify工作流聊天框"
        }
      },
      {
        path: "maxkb",
        name: "MaxKB",
        component: () => import("@/views/maxkb/index.vue"),
        meta: {
          title: "MaxKB"
        }
      },
      {
        path: "maxkbchat",
        name: "MaxKBChat",
        component: () => import("@/views/maxkb/maxkb-chat.vue"),
        meta: {
          title: "MaxKB聊天框"
        }
      },
      {
        path: "tools",
        name: "Tools",
        component: () => import("@/views/tools/index.vue"),
        meta: {
          title: "工具"
        }
      },
      {
        path: "account",
        name: "Account",
        component: () => import("@/views/account/index.vue"),
        meta: {
          title: "我的",
          noCache: true
        }
      },
      {
        path: "test",
        name: "Test",
        component: () => import("@/views/test/index.vue"),
        meta: {
          title: "Test",
          noCache: true
        }
      }
    ]
  }
];

export default routes;
